class JifenView extends egret.DisplayObjectContainer{
    private jifen:number;
    private type = 'attack';
    public constructor(jifen:number){
        super();
        this.jifen = jifen;
        this.addEventListener(egret.Event.ADDED_TO_STAGE,this.getViews,this);
    }


    public set jifenType(value:string){
        this.type = value;
        if(value == 'baoji'){
            let bg = utils.createBitmapByName("bj_bg");
            bg.width = 375;
            bg.height = bg.width / 375 * 258;
            this.addChild(bg);
            let jifentext = new BaseTextField;
            jifentext.text = '积 分';
            jifentext.size = 40;
            jifentext.bold = true;
            jifentext.textColor = 0xFFF102;
            jifentext.stroke = 5;
            jifentext.strokeColor = 0x6F4702;
            jifentext.rotation = -15;
            jifentext.x = 200;
            jifentext.y = 170;
            this.addChild(jifentext);
            let jifen = new BaseTextField;
            jifen.text = "+"+this.jifen;
            jifen.size = 45;
            jifen.textColor = 0x03FC98;
            jifen.stroke = 5;
            jifen.bold = true;
            jifen.strokeColor = 0x6F4702;
            jifen.rotation = -15;
            jifen.x = 180 - jifen.width / 2;
            jifen.y = 130;
            this.addChild(jifen);
        }else if(value == 'attack'){
            let jifen = new BaseTextField;
            jifen.text = "+"+ this.jifen;
            jifen.size = 60;
            jifen.textColor = 0xffea22;
            jifen.stroke = 4;
            jifen.bold = true;
            jifen.strokeColor = 0x5a3b0f;
            jifen.x = 180;
            jifen.y = 180;
            this.addChild(jifen);
        }
    }

    public get jifenType(){
        return this.type;
    }
    private getViews(){
        

    }
}